package com.gulimall.auth_server.controller;

import com.gulimall.auth_server.service.LoginService;
import com.gulimall.common.core.domain.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@Slf4j
@RequestMapping("/auth-server/login")
public class LoginController {
    @Resource
    private LoginService loginService;

    /**
     * 发送短信验证码
     */
    @GetMapping("/sendSms/{phone}")
    public Result<String> sendSms(@PathVariable("phone") String phone){
        log.info("发送短信验证码：");
        return loginService.sendSms(phone);
    }
}
